<?php
	if($_POST['action'] == 'loadvideos'){
		$rootFolder = $_SERVER['DOCUMENT_ROOT'];
	    require $rootFolder."/YumeAds/Classes/ChannelService.php";
		require $rootFolder."/YumeAds/Classes/DatabaseContext.php";
		
		$chanelService = new ChannelService();
		$videos = $chanelService->getAllChannelType2();
		
		$result = json_encode($videos);
		echo $result;
	}
?>